package org.cn.hj.org.dao;

import org.cn.hj.org.dto.DepartmentDto;
import org.cn.hj.org.query.DepartmentQuery;
import org.cn.hj.org.vo.DepartmentVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface DepartmentDao {

    /**
     * 通过id删除数据
     * @param id
     */
    void deleteById(Long id);

    /**
     * 新增数据
     * @param departmentDto
     */
    void insert(DepartmentDto departmentDto);

    /**
     * 修改数据
     * @param departmentDto
     */
    void update(DepartmentDto departmentDto);

    /**
     * 查询分页数据
     * @param departmentDto
     * @return
     */
    List<DepartmentVo> getPageList(DepartmentDto departmentDto);


    /**
     * 查询所有数据
     * @return
     */
    List<DepartmentVo> findAll(DepartmentQuery query);

    /**
     * 根据id获取一条数据
     * @param id
     * @return
     */
    DepartmentVo getOneById(Long id);

    /**
     * 查询总条数
     * @return
     */
    Long selectCount(DepartmentQuery query);
}
